import 'package:casdon/modules/device/data/api/nfc_check_bind_api.dart';

class NfcCheckBindModel {
  final bool bindState; // true表示已绑定设备，false表示未绑定
  final String deviceUuid; // 若已经绑定，则为绑定的设备uuid
  final String virtualId; // nfc的id
  final bool virtualIdIsExist; // 为false表示nfc不合法

  NfcCheckBindModel({
    required this.bindState,
    required this.deviceUuid,
    required this.virtualId,
    required this.virtualIdIsExist,
  });
  factory NfcCheckBindModel.fromApi(ResponseNFCCheckBindApi api) {
    return NfcCheckBindModel(
      bindState: api.bindState,
      deviceUuid: api.deviceUuid,
      virtualId: api.virtualId,
      virtualIdIsExist: api.virtualIdIsExist,
    );
  }
}
